package cn.easybuy.service.impl;

import cn.easybuy.dao.NewsDAO;
import cn.easybuy.dao.impl.NewsDAOImpl;
import cn.easybuy.entity.News;
import cn.easybuy.entity.PageInfo;
import cn.easybuy.service.NewsService;

import java.sql.SQLException;

public class NewsServiceImpl implements NewsService {
    private NewsDAO newsDAO = new NewsDAOImpl();

    @Override
    public PageInfo<News> listPage(PageInfo<News> pageInfo) throws SQLException {
        return newsDAO.listPage(pageInfo);
    }

    @Override
    public News getNewsById(int id) throws SQLException {
        return newsDAO.getNewsById(id);
    }
}
